package com;

import java.util.function.Consumer;
import java.util.function.Predicate;

public class LambdaOne {
    public static void  add(Consumer<String> consumer, Predicate<String> predicate,String girl){
        Boolean condition = predicate.test("");
        if(condition){
            consumer.accept(girl);
        }

    }
    public static void main(String[] args) {
        Predicate<String> p = String::isEmpty;
        Consumer<String> c = System.out::println;
        add(c,p,"小美丽");
    }
}
